drm: re-send ctm blob on modeset#256
Merged
Merged
Conversation
vaxerski
approved these changes
Mar 13, 2026
umbrageodotus
pushed a commit
to umbrageodotus/aquamarine
that referenced
this pull request
Mar 14, 2026
vaxerski
pushed a commit
that referenced
this pull request
May 10, 2026
A previous compositor (kwin etc.) can leave HDR, gamma, degamma and CTM properties set on a connector when it exits. Aquamarine only re-emitted these on user commits, so anything we don't actively manage stayed at the previous compositor's value, manifesting as washed-out colors or shifted saturation when starting Hyprland after kwin. HDR (#250) and CTM-with-non-identity (#256) were already covered. Extend the modeset path to also: - re-send gamma_lut/degamma_lut on modeset; an empty STATE.gammaLut produces a zero blob, which clears the kernel state. only ride this path when the prop actually exists, otherwise we'd log a spurious "no gamma_lut prop" error on every modeset for connectors without programmable gamma. - re-send CTM unconditionally on modeset, identity included, so the kernel always replaces a stale matrix with our current one. the blob builder produces a real identity matrix when STATE.ctm == Mat3x3(), so we never send blob_id=0 (which #256 documented as problematic). Fixes #127. Co-authored-by: j4kuuu <j4kuuu>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
like hdr #250, ctm needs to be re-sent on modeset, otherwise COMMITTED stays true and it's not sent after e.g. suspend or
hyprctl dispatch dpms off.Specifically this is observed for hyprsunset users like so hyprwm/hyprsunset#65:
(Unlike hdr, have to make sure ctm has value otherwise monitor gets weird colors)
tested with and without hyprsunset running